package 公共字符串;

import java.util.Scanner;

// 注意类名必须为 Main, 不要有任何 package xxx 信息
public class Main {
    static int N = 300;
    static boolean[] st = new boolean[N];

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        String s1 = in.nextLine();
        String s2 = in.nextLine();
        for (int i = 0; i < s2.length(); i++) {
            st[s2.charAt(i)] = true;
        }
        for (int i = 0; i < s1.length(); i++) {
            if(!st[s1.charAt(i)]){
                System.out.print(s1.charAt(i));
            }
        }
    }
}